<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: TableData::Presenters::HTML
  
    &mdash; Documentation by YARD 0.8.7.3
  
</title>

  <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../../';
  framesUrl = "../../frames.html#!" + escape(window.location.href);
</script>


  <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="../../_index.html">Index (H)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../../TableData.html" title="TableData (module)">TableData</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Presenters.html" title="TableData::Presenters (module)">Presenters</a></span></span>
     &raquo; 
    <span class="title">HTML</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../../class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="../../method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="../../file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Class: TableData::Presenters::HTML
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName"><span class='object_link'><a href="../Presenter.html" title="TableData::Presenter (class)">TableData::Presenter</a></span></span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next"><span class='object_link'><a href="../Presenter.html" title="TableData::Presenter (class)">TableData::Presenter</a></span></li>
          
            <li class="next">TableData::Presenters::HTML</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/tabledata/presenters/html.rb</dd>
  
</dl>
<div class="clear"></div>







  <h2>Instance Attribute Summary</h2>
  
  <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../Presenter.html" title="TableData::Presenter (class)">TableData::Presenter</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="../Presenter.html#options-instance_method" title="TableData::Presenter#options (method)">#options</a></span>, <span class='object_link'><a href="../Presenter.html#table-instance_method" title="TableData::Presenter#table (method)">#table</a></span>, <span class='object_link'><a href="../Presenter.html#tables-instance_method" title="TableData::Presenter#tables (method)">#tables</a></span></p>


  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#html_foot-instance_method" title="#html_foot (instance method)">- (Object) <strong>html_foot</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#html_head-instance_method" title="#html_head (instance method)">- (Object) <strong>html_head</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#html_table_header-instance_method" title="#html_table_header (instance method)">- (Object) <strong>html_table_header</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#string-instance_method" title="#string (instance method)">- (Object) <strong>string</strong>(options = nil) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#table_html-instance_method" title="#table_html (instance method)">- (Object) <strong>table_html</strong>(table) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#tables_html-instance_method" title="#tables_html (instance method)">- (Object) <strong>tables_html</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  


  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Presenter.html" title="TableData::Presenter (class)">TableData::Presenter</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="../Presenter.html#add_presenter%21-class_method" title="TableData::Presenter.add_presenter! (method)">add_presenter!</a></span>, <span class='object_link'><a href="../Presenter.html#initialize-instance_method" title="TableData::Presenter#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../Presenter.html#multiple_tables%3F-instance_method" title="TableData::Presenter#multiple_tables? (method)">#multiple_tables?</a></span>, <span class='object_link'><a href="../Presenter.html#present-class_method" title="TableData::Presenter.present (method)">present</a></span>, <span class='object_link'><a href="../Presenter.html#presenter_exists%3F-class_method" title="TableData::Presenter.presenter_exists? (method)">presenter_exists?</a></span>, <span class='object_link'><a href="../Presenter.html#replace_presenter%21-class_method" title="TableData::Presenter.replace_presenter! (method)">replace_presenter!</a></span>, <span class='object_link'><a href="../Presenter.html#single_table%3F-instance_method" title="TableData::Presenter#single_table? (method)">#single_table?</a></span>, <span class='object_link'><a href="../Presenter.html#write-instance_method" title="TableData::Presenter#write (method)">#write</a></span></p>
<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <p class="notice">This class inherits a constructor from <span class='object_link'><a href="../Presenter.html#initialize-instance_method" title="TableData::Presenter#initialize (method)">TableData::Presenter</a></span></p>
  
</div>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="html_foot-instance_method">
  
    - (<tt>Object</tt>) <strong>html_foot</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


20
21
22
23
24
25</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/tabledata/presenters/html.rb', line 20</span>

<span class='kw'>def</span> <span class='id identifier rubyid_html_foot'>html_foot</span>
  <span class='heredoc_beg'>&lt;&lt;-EOHTML</span>
<span class='tstring_content'>  &lt;/body&gt;
&lt;/html&gt;
</span><span class='heredoc_end'>  EOHTML
</span><span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="html_head-instance_method">
  
    - (<tt>Object</tt>) <strong>html_head</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


9
10
11
12
13
14
15
16
17
18</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/tabledata/presenters/html.rb', line 9</span>

<span class='kw'>def</span> <span class='id identifier rubyid_html_head'>html_head</span>
  <span class='heredoc_beg'>&lt;&lt;-EOHTML</span>
<span class='tstring_content'>&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset=&#39;utf-8&#39;&gt;
  &lt;/head&gt;
  &lt;body&gt;
</span><span class='heredoc_end'>  EOHTML
</span><span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="html_table_header-instance_method">
  
    - (<tt>Object</tt>) <strong>html_table_header</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


27
28
29
30
31
32
33
34
35
36</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/tabledata/presenters/html.rb', line 27</span>

<span class='kw'>def</span> <span class='id identifier rubyid_html_table_header'>html_table_header</span>
  <span class='kw'>if</span> <span class='ivar'>@table</span><span class='period'>.</span><span class='id identifier rubyid_headers?'>headers?</span>
    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>    &lt;table&gt;\n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>      &lt;thead&gt;\n        &lt;tr&gt;\n</span><span class='tstring_end'>&quot;</span></span><span class='op'>+</span>
      <span class='ivar'>@table</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_cell'>cell</span><span class='op'>|</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>          &lt;th&gt;</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escapeHTML'>escapeHTML</span><span class='lparen'>(</span><span class='id identifier rubyid_cell'>cell</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>&lt;/th&gt;</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='op'>+</span>
      <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n        &lt;/tr&gt;\n      &lt;/thead&gt;\n</span><span class='tstring_end'>&quot;</span></span>
  <span class='kw'>else</span>
    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>    &lt;table&gt;\n</span><span class='tstring_end'>&quot;</span></span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="string-instance_method">
  
    - (<tt>Object</tt>) <strong>string</strong>(options = nil) 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


52
53
54</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/tabledata/presenters/html.rb', line 52</span>

<span class='kw'>def</span> <span class='id identifier rubyid_string'>string</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_table_html'>table_html</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="table_html-instance_method">
  
    - (<tt>Object</tt>) <strong>table_html</strong>(table) 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


42
43
44
45
46
47
48
49
50</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/tabledata/presenters/html.rb', line 42</span>

<span class='kw'>def</span> <span class='id identifier rubyid_table_html'>table_html</span><span class='lparen'>(</span><span class='id identifier rubyid_table'>table</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_html_table_header'>html_table_header</span><span class='op'>+</span>
    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>      &lt;tbody&gt;\n</span><span class='tstring_end'>&quot;</span></span><span class='op'>+</span>
    <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_row'>row</span><span class='op'>|</span>
      <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>        &lt;tr&gt;\n</span><span class='tstring_end'>&quot;</span></span><span class='op'>+</span><span class='id identifier rubyid_row'>row</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_cell'>cell</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>          &lt;td&gt;</span><span class='embexpr_beg'>#{</span><span class='const'>CGI</span><span class='period'>.</span><span class='id identifier rubyid_escapeHTML'>escapeHTML</span><span class='lparen'>(</span><span class='id identifier rubyid_cell'>cell</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>&lt;/td&gt;</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='op'>+</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n        &lt;/tr&gt;\n</span><span class='tstring_end'>&quot;</span></span>
    <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='op'>+</span>
    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>      &lt;/tbody&gt;\n</span><span class='tstring_end'>&quot;</span></span><span class='op'>+</span>
    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>    &lt;/table&gt;\n</span><span class='tstring_end'>&quot;</span></span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="tables_html-instance_method">
  
    - (<tt>Object</tt>) <strong>tables_html</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


38
39
40</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/tabledata/presenters/html.rb', line 38</span>

<span class='kw'>def</span> <span class='id identifier rubyid_tables_html'>tables_html</span>
  <span class='id identifier rubyid_html_head'>html_head</span><span class='op'>+</span><span class='id identifier rubyid_tables'>tables</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_table'>table</span><span class='op'>|</span> <span class='id identifier rubyid_table_html'>table_html</span><span class='lparen'>(</span><span class='id identifier rubyid_table'>table</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='op'>+</span><span class='id identifier rubyid_html_foot'>html_foot</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Sun Feb 23 13:33:20 2014 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.3 (ruby-2.1.0).
</div>

  </body>
</html>